#ifndef SETTING_H
#define SETTING_H

#include <QDialog>
#include <QSettings>
#include <QCloseEvent>

namespace Ui {
class Setting;
}

class Setting : public QDialog
{
    Q_OBJECT

public:
    explicit Setting(QWidget *parent = nullptr);
    ~Setting();

private:
    Ui::Setting *ui;
//    QSettings settings;
    QSettings settings;
    void closeEvent(QCloseEvent *event);
    int soundInited = false;

protected:
    void showEvent(QShowEvent *event) override;

private slots:
    void on_pbOk_clicked();
    void on_pbCancel_clicked();
    void on_cbSound_currentIndexChanged(int);
};

#endif // SETTING_H
